<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">
    <title>TUFA众包</title>
    <meta name="keywords" content="TUFA众包">
    <meta name="description" content=">TUFA众包">

    <%@ include file="/include/mobilelibs.jsp" %>
		
<style>		
.fontSize {
	font-family: "黑体" !important;
		font-size: 14px !important;
	}	
</style>
</head>

	<body>
	<a type="hidden" href="#" id="taskDetailInfo"/>
		<div class="mui-content">
			<div class="fixedindex">
			<div class="mui-slider silderHeight">
				<div class="mui-slider-group mui-slider-loop">

					<div class="mui-slider-item mui-slider-item-duplicate">
						<a href="#">
							<img src="images/yuantiao.jpg">
						</a>
					</div>

					<div class="mui-slider-item">
						<!--支持循环，需要重复图片节点-->
						<a href="#">
							<img src="images/shuijiao.jpg">
						</a>
					</div>
					<div class="mui-slider-item">
						<a href="#">
							<img src="images/muwu.jpg">
						</a>
					</div>
					<div class="mui-slider-item">
						<a href="#">
							<img src="images/cbd.jpg">
						</a>
					</div>
					<div class="mui-slider-item ">
						<a href="#">
							<img src="images/yuantiao.jpg">
						</a>
					</div>

					<div class="mui-slider-item mui-slider-item-duplicate">
						<a href="#">
							<img src="images/shuijiao.jpg">
							<!--支持循环，需要重复图片节点-->
						</a>

					</div>

				</div>
				<div class="mui-slider-indicator">
					<div class="mui-indicator mui-active"></div>
					<div class="mui-indicator"></div>
					<div class="mui-indicator"></div>
					<div class="mui-indicator"></div>
				</div>
			</div>

			<nav class="center center-table">
				<a class="mui-tab-item mui-active" type="DATA">
					<span class="mui-icon iconfont1">&#xe607;</span>
					<span class="center-tabel-text">数据</span>
				</a>
				<a class="mui-tab-item" type="INVEST">
					<span class="mui-icon iconfont2">&#xe602;</span>
					<span class="center-tabel-text">市调</span>
				</a>
				<a class="mui-tab-item" type="ARRANG">
					<span class="mui-icon iconfont3">&#xe601;</span>
					<span class="center-tabel-text">理货</span>
				</a>
				<a class="mui-tab-item" type="PROMOTION">
					<span class="mui-icon iconfont4">&#xe606;</span>
					<span class="center-tabel-text">促销</span>
				</a>
			</nav>
                      
                 <div class="R-task">
					<span>推荐任务</span>
					
				</div>

           </div>
          
	<div class="indexfooter">		
		<c:forEach var="item" items="${taskList}" varStatus="status">   
		 <div class="below" onclick="taskDetail('${item.id}')">
				<div class="footer-left"> 
					    <c:if test="${item.taskType=='理货'}">
					       <div class="below-left4">
								<div class="iconfont5">&#xe601;</div>
							</div>
					    </c:if>
					     <c:if test="${item.taskType=='促销'}">
					      <div class="below-left3">
								<div class="iconfont5">&#xe604;</div>
							</div>
					    </c:if>
					     <c:if test="${item.taskType=='数据'}">
							<div class="below-left">
								<div class="iconfont5">&#xe607;</div>
							</div>
						</c:if>
					     <c:if test="${item.taskType=='市调'}">
							<div class="below-left1">
								<div class="iconfont6">&#xe602;</div>
							</div>
						</c:if>
					<span class="footer-text">${item.taskType }</span>
				</div>
				<div class="footer-center">
					<p class="pTitle">[${item.taskType }] ${item.taskName }</p>
					<p class="pTime">时限：${item.endDate }</p>
					<p class="pPlace">门店：${item.storeName }</p>
				</div>
				<div class="price">
					<p class="proceText">${item.money}</p>
				</div>
			</div>
		 </c:forEach>
	</div>	 
</div>	
		<nav class="mui-bar2 mui-bar-tab"> 
			<a class="mui-tab-item mui-active"  type="list">
				<span class="mui-icon iconfont">&#xe605;</span>
				<span class="mui-tab-label fontSize">任务大厅</span>
			</a>
			<a class="mui-tab-item" type="mytask">
				<span class="mui-icon iconfont">&#xe603;</span>
				<span class="mui-tab-label fontSize" onclick="goMyTask()">我的任务</span>
			</a>
			<a class="mui-tab-item" type="person">
				<span class="mui-icon iconfont">&#xe600;</span>
				<span class="mui-tab-label fontSize">个人中心</span>
			</a>
		</nav>
		<script type="text/javascript" charset="utf-8">
		    localStorage.userId= '${userId}';
			var gallery = mui('.mui-slider');
			gallery.slider({
				interval: 5000 //自动轮播周期，若为0则不自动播放，默认为0；
			});
			
			function taskDetail(id){
				var userId = '${userId}';
				window.location.href  = "subTaskDetail.html?userId=" +userId +"&id="+id
			}
			function goMyTask(){
				var userId = '${userId}';
				window.location.href  = "myTask.html?userId=" +userId
			}
			
			//添加列表项的点击事件
			mui(".mui-bar-tab").on('tap','.mui-tab-item',function(){
			  var type = this.getAttribute('type');
		 	  if(type =='list') {
		 		 mui.openWindow({
					    id:'list.html',
					    url:'mobile.html?userId='+localStorage.userId
					  });  
		 	  }else if(type =='mytask')    {
		 		 mui.openWindow({
					    id:'myTask.html',
					    url:'myTask.html?userId='+localStorage.userId
					  });  
		 	  }else if(type =='person')    {
			 		 mui.openWindow({ 
						    id:'personalCenter.html',
						    url:'personalCenter.html?userId='+localStorage.userId
						  });  
			 	  }
			 
			});
			
			//添加列表项的点击事件
			mui(".center-table").on('tap','.mui-tab-item',function(){
			  var type = this.getAttribute('type');
	 		  mui.openWindow({
				    id:'list.html',
				    url:'list.html?userId='+localStorage.userId +"&taskType=" +type
				  });  
			});
		</script>
	</body>
    
</html>